<!DOCTYPE html>
<html lang="en"> xmlns:th="http://www.thymeleaf.org">
<head>
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <meta charset="UTF-8">
    <title>Title</title>
    <link th:href="@{/local/css/login.css}" rel="stylesheet">
    <link  th:href="@{/local/css/page.css}"  rel="stylesheet">
</head>
<body>
<div id="top" th:include="top.html::top"></div>

<div id="middle">
    <div id="left" th:include="left.html::left"></div>
    <div id="right">
        <div id="msg" th:text="${msg}"></div>
        <hr>
        <a th:href="@{/admin/gotoAddGoods}">添加商品</a>
        <table>
            <tr>
                <th>商品ID</th>
                <th>商品名称</th>
                <th>类别名称</th>
                <th>商品销量</th>
                <th>城市</th>
                <th>热销</th>
                <th>操作</th>
            </tr>
            <tr th:each="goods,stat:${goodsListPage.list}" th:class="${stat.odd}?'bg2':''">
                <td th:text="${goods.getGdid()}"></td>
                <td th:text="${goods.getGdname()}"></td>
                <td th:text="${goods.getGoodstype().getTname()}"></td>

                <td th:text="${goods.getGdsaleqty()}"></td>
                <td th:text="${goods.getGdcity()}"></td>
                <td >
                    <span th:if="${goods.getGdhot()} eq 1">是</span>
                    <span th:unless="${goods.getGdhot()} eq 1">否</span>
                </td>
                <td>
                    <a th:href="@{/admin/delGoods/} + ${goods.getGdid()}">删除</a>
                    <a th:href="@{/admin/goods/} + ${goods.getGdid()}">编辑</a>
                </td>
            </tr>

        </table>

        <div th:include="page.html::myPage(${goodsListPage},goods)"></div>


    </div>
</div>

<div id="bottom" th:include="bottom.html::bottom"></div>
</body>
</html>